package com.yichen.ycapi.service.impl.inner;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yichen.ycApiCommon.service.InnerUserInterfaceInfoService;
import com.yichen.ycApiCommon.model.entity.UserInterfaceInfo;
import com.yichen.ycapi.service.UserInterfaceInfoService;
import org.apache.dubbo.config.annotation.DubboService;

import javax.annotation.Resource;

/**
 * @Author: yichenwu
 * @Date:2024/7/31 0:26
 */
@DubboService
public class InnerUserInterfaceInfoServiceImpl implements InnerUserInterfaceInfoService {
    @Resource
    UserInterfaceInfoService userInterfaceInfoService;
    @Override
    public Boolean invokeCountPlus(Long interfaceInfoId, Long userId) {
        return userInterfaceInfoService.invokeCountPlus(interfaceInfoId,userId);
    }

    @Override
    public UserInterfaceInfo invokeUserInterfaceInfo(Long interfaceInfoId, Long userId) {
        return userInterfaceInfoService.getOne(new QueryWrapper<UserInterfaceInfo>()
                .eq("interfaceInfoId",interfaceInfoId)
                .eq("userId",userId));
    }
}
